<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8" />
    <title>闲闲二手交易网站 | 商品管理</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <meta content="Preview page of Metronic Admin Theme #4 for statistics, charts, recent events and reports" name="description" />
    <!-- BEGIN GLOBAL MANDATORY STYLES -->
    <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css" />
    <link href="/assets/metronic/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/metronic/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/metronic/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/metronic/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/metronic/global/plugins/icheck/skins/all.css" rel="stylesheet" type="text/css" />
    <!-- END GLOBAL MANDATORY STYLES -->
    <!-- BEGIN PAGE LEVEL PLUGINS -->
    <link href="/assets/metronic/global/plugins/datatables/datatables.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/metronic/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.css" rel="stylesheet" type="text/css" />
    <!-- END PAGE LEVEL PLUGINS -->
    <!-- BEGIN THEME GLOBAL STYLES -->
    <link href="/assets/metronic/global/css/components.min.css" rel="stylesheet" id="style_components" type="text/css" />
    <link href="/assets/metronic/global/css/plugins.min.css" rel="stylesheet" type="text/css" />
    <!-- END THEME GLOBAL STYLES -->
    <!-- BEGIN THEME LAYOUT STYLES -->
    <link href="/assets/metronic/layouts/layout4/css/layout.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/metronic/layouts/layout4/css/themes/default.min.css" rel="stylesheet" type="text/css" id="style_color" />
    <link href="/assets/metronic/layouts/layout4/css/custom.min.css" rel="stylesheet" type="text/css" />
    <!-- END THEME LAYOUT STYLES -->
    <link rel="shortcut icon" href="favicon.ico" />
</head>
<!-- END HEAD -->

<body class="page-container-bg-solid page-header-fixed page-sidebar-closed-hide-logo">
<!-- BEGIN HEADER -->
<div class="page-header navbar navbar-fixed-top">
    <!-- BEGIN HEADER INNER -->
    <div class="page-header-inner ">
        <!-- BEGIN LOGO -->
        <div class="page-logo">
            <a href="javascript:location.reload()" style="margin-top: 14px;margin-left: 10px">
                <span style="font-size: 20px;">XX-Transaction</span>
            </a>
            <div class="menu-toggler sidebar-toggler">
                <!-- DOC: Remove the above "hide" to enable the sidebar toggler button on header -->
            </div>
        </div>
        <!-- END LOGO -->
        <!-- BEGIN RESPONSIVE MENU TOGGLER -->
        <a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse"> </a>
        <!-- END RESPONSIVE MENU TOGGLER -->
        <!-- BEGIN PAGE TOP -->
    </div>
    <!-- END HEADER INNER -->
</div>
<!-- END HEADER -->
<!-- BEGIN HEADER & CONTENT DIVIDER -->
<div class="clearfix"> </div>
<!-- END HEADER & CONTENT DIVIDER -->
<!-- BEGIN CONTAINER -->
<div class="page-container">
    <div th:replace="common/seller-menu"/>
    <!-- BEGIN CONTENT -->
    <div class="page-content-wrapper">
        <!-- BEGIN CONTENT BODY -->
        <div class="page-content">
            <!-- BEGIN PAGE HEAD-->
            <div class="page-head">
                <!-- BEGIN PAGE TITLE -->
                <div class="page-title">
                    <h1>卖家中心</h1>
                </div>
                <!-- END PAGE TITLE -->
            </div>
            <!-- END PAGE HEAD-->
            <!-- BEGIN PAGE BREADCRUMB -->
            <ul class="page-breadcrumb breadcrumb">
                <li>
                    <a href="index.html">商品管理</a>
                    <i class="fa fa-circle"></i>
                </li>
                <li>
                    <span class="active">商品详情</span>
                </li>
            </ul>
            <!-- END PAGE BREADCRUMB -->
            <!-- BEGIN PAGE BASE CONTENT -->
            <div class="row">
                <div class="portlet light bordered">
                    <div class="portlet-title">
                        <div class="caption font-dark">
                            <i class="icon-settings font-dark"></i>
                            <span class="caption-subject bold uppercase">商品表</span>
                        </div>
                    </div>
                    <div class="portlet-body">
                        <div class="table-toolbar">
                            <div class="row">
                                <div class="col-md-1">
                                    <div class="btn-group">
                                        <a id="sample_editable_1_new" class="btn sbold green" href="/sellerGoods/add"> 添加
                                            <i class="fa fa-plus"></i>
                                        </a>
                                    </div>
                                </div>
                                <div class="col-md-1" >
                                    <div class="btn-group" style="padding-left: 24px">
                                        <button class="btn btn-danger" onclick="delSelected()"> 删除选中
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="table table-striped table-bordered table-hover table-checkable order-column" id="dataTable111">
                            <thead>
                            <tr>
                                <th><input type="checkbox" name="firstBox" id="firstBox" class="icheckbox_minimal-grey"/></th>
                                <th> 商品编号 </th>
                                <th> 名称 </th>
                                <th> 分类 </th>
                                <th> 现价 </th>
                                <th> 原价 </th>
                                <th> 详情 </th>
                                <th> 数量 </th>
                                <th> 图片1 </th>
                                <th> 图片2 </th>
                                <th> 图片3 </th>
                                <th> 图片4 </th>
                                <th> 图片5 </th>
                                <th> 上架时间 </th>
                                <th> 更新时间 </th>
                                <th> 操作 </th>
                            </tr>
                            </thead>
                            <tbody>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <!-- END PAGE BASE CONTENT -->
        </div>
        <!-- END CONTENT BODY -->
    </div>
    <!-- END CONTENT -->
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<div class="page-footer">
</div>
<!-- END FOOTER -->
<!-- BEGIN CORE PLUGINS -->
<script src="/assets/metronic/global/plugins/jquery.min.js" type="text/javascript"></script>
<script src="/assets/metronic/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/assets/metronic/global/plugins/js.cookie.min.js" type="text/javascript"></script>
<script src="/assets/metronic/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="/assets/metronic/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
<script src="/assets/metronic/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS -->
<script src="/assets/metronic/global/scripts/datatable.js" type="text/javascript"></script>
<script src="/assets/metronic/global/plugins/datatables/datatables.min.js" type="text/javascript"></script>
<script src="/assets/metronic/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js" type="text/javascript"></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN THEME GLOBAL SCRIPTS -->
<script src="/assets/metronic/global/scripts/app.min.js" type="text/javascript"></script>
<!-- END THEME GLOBAL SCRIPTS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="/assets/metronic/pages/scripts/dashboard.min.js" type="text/javascript"></script>
<script src="/assets/metronic/global/plugins/morris/morris.min.js" type="text/javascript"></script>
<script src="/assets/metronic/global/plugins/morris/raphael-min.js" type="text/javascript"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<!-- BEGIN THEME LAYOUT SCRIPTS -->
<script src="/assets/metronic/layouts/layout4/scripts/layout.min.js" type="text/javascript"></script>
<script src="/assets/metronic/layouts/layout4/scripts/demo.min.js" type="text/javascript"></script>
<script src="/assets/metronic/layouts/global/scripts/quick-sidebar.min.js" type="text/javascript"></script>
<script src="/assets/metronic/layouts/global/scripts/quick-nav.min.js" type="text/javascript"></script>
<!-- END THEME LAYOUT SCRIPTS -->
<!-- App -->
<script src="/assets/app/app.js" type="text/javascript"></script>
<script src="/assets/app/datetime.js" type="text/javascript"></script>
<script>
    var _dataTable;
    var _delSelected;
    $(function () {
        var _columns = [
            {
                "data":function (row, type, val, meta) {
                    return '<input type="checkbox" name="box" id="box" class="icheckbox_minimal-grey" value="'+row.id+'"/>'
                }
            },
            {"data": "id"},
            {
                "data": "goodsName",
                render: function(data, type, row, meta) {
                    var html;
                    html = '<div style="text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:150px;" title=' + data + '>' + data + '</div>';
                    return html;
                }
            },
            {
                "data": "category.categoryName",
                render: function(data, type, row, meta) {
                    var html;
                    html = '<div style="text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:80px;" title=' + data + '>' + data + '</div>';
                    return html;
                }
            },
            {"data": "price"},
            {"data": "originalPrice"},
            {
                "data": "goodsDetail",
                render: function(data, type, row, meta) {
                    var html;
                    html = '<div style="text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:150px;" title=' + data + '>' + data + '</div>';
                    return html;
                }
            },
            {"data": "goodsNumber"},
            {
                "data": function (row,type,val,meta) {
                    if (row.picture1 == null){
                        return '';
                    }
                    return '<a href="'+row.picture1+'" target="_blank">查看</a>';
                }
            },
            {
                "data": function (row,type,val,meta) {
                    if (row.picture2 == null){
                        return '';
                    }
                    return '<a href="'+row.picture2+'" target="_blank">查看</a>';
                }
            },
            {
                "data": function (row,type,val,meta) {
                    if (row.picture3 == null){
                        return '';
                    }
                    return '<a href="'+row.picture3+'" target="_blank">查看</a>';
                }
            },
            {
                "data": function (row,type,val,meta) {
                    if (row.picture4 == null){
                        return '';
                    }
                    return '<a href="'+row.picture4+'" target="_blank">查看</a>';
                }
            },
            {
                "data": function (row,type,val,meta) {
                    if (row.picture5 == null){
                        return '';
                    }
                    return '<a href="'+row.picture5+'" target="_blank">查看</a>';
                }
            },
            {
                "data": function (row,type,val,meta) {
                    return DateTime.format(row.created,"yyyy-MM-dd");
                },
                render: function(data, type, row, meta) {
                    var html;
                    html = '<div style="text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100px;" title=' + data + '>' + data + '</div>';
                    return html;
                }
            },
            {
                "data": function (row,type,val,meta) {
                    return DateTime.format(row.updated,"yyyy-MM-dd HH:mm");
                },
                render: function(data, type, row, meta) {
                    var html;
                    html = '<div style="text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:150px;" title=' + data + '>' + data + '</div>';
                    return html;
                }
            },
            {
                "data": function (row, type, val, meta) {
                    return '<a href="/sellerGoods/update?id='+row.id+'"  class="btn purple"><i class="fa fa-edit"></i>修改</a><a href="/sellerGoods/delete?id='+ row.id +'"  class="btn red" style="width: 68px"><i class="fa fa-times"></i>删除</a>';
                },
            }
        ];
        _dataTable = MyShopApp.initDataTables("/sellerGoods/page",_columns);
    });

    function delSelected() {
        _delSelected = MyShopApp.initDelSelected("/sellerGoods/delSelected?ids=");
    }
</script>
</body>
</html>